<?php
$sql="
CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_gzh_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `uid` varchar(255) DEFAULT '' COMMENT '我的uid',
  `posterid` int(11) DEFAULT '0' COMMENT '海报id',
  `from_uid` varchar(255) DEFAULT '' COMMENT '邀请人uid',
  `subcredit` int(11) DEFAULT '0' COMMENT '关注者积分',
  `reccredit` int(11) DEFAULT '0' COMMENT '推荐人积分',
  `createtime` int(11) DEFAULT '0',
  `recmoney` decimal(10,2) DEFAULT '0.00' COMMENT '推荐人余额',
  `submoney` decimal(10,2) DEFAULT '0.00' COMMENT '关注者余额',
  `isunsub` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否取消关注',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_gzh_member` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `uid` int(10) NOT NULL,
  `openid` varchar(100) NOT NULL DEFAULT '',
  `createtime` int(10) NOT NULL,
  `scancodenum` int(10) NOT NULL DEFAULT '0' COMMENT '总扫码次数',
  `randomnum` int(10) NOT NULL DEFAULT '0' COMMENT '总随机触发数',
  `level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '等级 0本身 1级  2级 3级',
  `level1_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级1会员id',
  `level2_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级2会员id',
  `level3_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级3会员id',
  `nickname` varbinary(100) NOT NULL DEFAULT '' COMMENT '会员昵称',
  `parentid` int(11) NOT NULL DEFAULT '0' COMMENT '父级id',
  `level_num` int(11) NOT NULL DEFAULT '0' COMMENT '无限极 0 初级  大于0 级数',
  `misterid` int(11) NOT NULL DEFAULT '0' COMMENT '源头',
  `isceshi` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否测试数据',
  `ranking` int(11) NOT NULL DEFAULT '0' COMMENT '排名',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_gzh_poster` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `type` tinyint(3) DEFAULT '0' COMMENT '0关注海报',
  `title` varchar(255) DEFAULT '' COMMENT '标题',
  `bg` varchar(255) DEFAULT '' COMMENT '背景',
  `data` text COMMENT '位置数据',
  `keyword` varchar(255) DEFAULT '' COMMENT '触发关键词',
  `times` int(11) DEFAULT '0',
  `follows` int(11) DEFAULT '0',
  `isdefault` tinyint(3) DEFAULT '0' COMMENT '是否默认 1是 0否',
  `resptitle` varchar(255) DEFAULT '' COMMENT '推送标题',
  `respthumb` varchar(255) DEFAULT '' COMMENT '推送图片',
  `createtime` int(11) DEFAULT '0' COMMENT '推送时间',
  `respdesc` varchar(255) DEFAULT '' COMMENT '推送内容',
  `respurl` varchar(255) DEFAULT '' COMMENT '推送url',
  `waittext` varchar(255) DEFAULT '' COMMENT '等待提示',
  `oktext` varchar(255) DEFAULT '' COMMENT '制作成功提示',
  `subcredit` int(11) DEFAULT '0' COMMENT '关注者获得积分',
  `submoney` decimal(10,2) DEFAULT '0.00' COMMENT '关注者获得金额',
  `reccredit` int(11) DEFAULT '0' COMMENT '推荐人获得积分',
  `recmoney` decimal(10,2) DEFAULT '0.00' COMMENT '推荐人获得金额',
  `paytype` tinyint(1) DEFAULT '0' COMMENT '奖励现金方式 0余额 1微信钱包',
  `scantext` varchar(255) DEFAULT '' COMMENT '推荐者通知',
  `subtext` varchar(255) DEFAULT '' COMMENT '关注者通知',
  `beagent` tinyint(3) DEFAULT '0',
  `bedown` tinyint(3) DEFAULT '0',
  `isopen` tinyint(3) DEFAULT '0' COMMENT '是否开启',
  `opentext` varchar(255) DEFAULT '' COMMENT '未开放时候的提示',
  `openurl` varchar(255) DEFAULT '' COMMENT '未开放时候的说明连接',
  `templateid` varchar(255) DEFAULT '' COMMENT '通知模板消息ID（任务处理通知）',
  `subpaycontent` text COMMENT '您通过 [nickname]的推广二维码扫码关注的奖励',
  `recpaycontent` text COMMENT '推荐 [nickname] 扫码关注的奖励',
  `entrytext` varchar(255) DEFAULT '',
  `reccouponid` int(11) DEFAULT '0' COMMENT '推送者送优惠券ID',
  `reccouponnum` int(11) DEFAULT '0' COMMENT '推送者送优惠券数量',
  `subcouponid` int(11) DEFAULT '0' COMMENT '关注者送优惠券ID',
  `subcouponnum` int(11) DEFAULT '0' COMMENT '关注者送优惠券数量',
  `random` int(10) NOT NULL DEFAULT '0' COMMENT '随机次数  n次之后重0开始 触发一次',
  `sendtype` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'n次后触发发送类型 0链接 1二维码 2图文',
  `sendval` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者链接文字',
  `sendurl` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者链接',
  `followval` varchar(255) NOT NULL DEFAULT '' COMMENT '关注着链接文字',
  `followurl` varchar(255) NOT NULL DEFAULT '' COMMENT '关注者链接',
  `sendcode` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者二维码',
  `followcode` varchar(255) NOT NULL DEFAULT '' COMMENT '关注者二维码',
  `rec_credit_random` int(10) NOT NULL DEFAULT '0' COMMENT '随机数到达后赠送推送者积分',
  `rec_money_random` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '随机数到达后赠送推送者金额',
  `relaystart` int(11) NOT NULL DEFAULT '0' COMMENT '接力起始值',
  `pcate` int(10) NOT NULL DEFAULT '0',
  `ccate` int(10) NOT NULL DEFAULT '0',
  `level1_credit` int(10) NOT NULL DEFAULT '0' COMMENT '一级获取积分',
  `level2_credit` int(10) NOT NULL DEFAULT '0',
  `level3_credit` int(10) NOT NULL DEFAULT '0',
  `level1_money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `level2_money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `level3_money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `level0_val` varchar(255) NOT NULL DEFAULT '' COMMENT '分销统一提醒文字',
  `level0_url` varbinary(255) NOT NULL DEFAULT '' COMMENT '分销统一提醒文字链接',
  `level_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 一级 2二级 3三级',
  `coverimg` varchar(255) NOT NULL DEFAULT '' COMMENT '封面图片',
  `isopen_level` tinyint(3) DEFAULT '0' COMMENT '是否开启三级营销',
  `limitrandom` int(10) NOT NULL DEFAULT '0',
  `isclock` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启打卡 0否 1是',
  `clock_start_time` varchar(10) NOT NULL DEFAULT '' COMMENT '打开开始时间',
  `clock_end_time` varchar(10) NOT NULL DEFAULT '' COMMENT '打开结束时间',
  `clock_msg` varbinary(1000) NOT NULL DEFAULT '' COMMENT '打卡成功提醒',
  `clock_err` varbinary(1000) NOT NULL DEFAULT '' COMMENT '错过打卡时间提醒',
  `clock_send_credit` int(10) NOT NULL DEFAULT '0' COMMENT '打卡赠送积分',
  `clock_send_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '打卡赠送余额',
  `reckeyword` varchar(20) NOT NULL DEFAULT '' COMMENT '完成邀请关键词',
  `minetext` varchar(255) NOT NULL DEFAULT '' COMMENT '自扫了通知',
  `next_active_text` varchar(255) NOT NULL DEFAULT '' COMMENT '下一轮提示语',
  `scan_random_text` varchar(255) NOT NULL DEFAULT '' COMMENT '随机任务完成通知',
  `subresptype` tinyint(1) NOT NULL DEFAULT '0' COMMENT '关注者回复类型0图文2关键字',
  `subresp_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '关注着回复触发关键字',
  `isopenauto` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启自动生成海报',
  `subaudio_url` varchar(255) NOT NULL DEFAULT '' COMMENT '推送关注者音频链接',
  `sub_sendval` varchar(255) NOT NULL DEFAULT '',
  `sub_sendurl` varchar(255) NOT NULL DEFAULT '',
  `isunsubscribe` tinyint(1) NOT NULL DEFAULT '0' COMMENT '取消关注事件是否开启',
  `unsub_sendval` varchar(255) NOT NULL DEFAULT '' COMMENT '取消关注推送给上级内容',
  `israndomimg` tinyint(1) NOT NULL DEFAULT '0' COMMENT '图片是否随机抽取0否1是',
  `randomimgs` text COMMENT '随机图片抽取地址序列化',
  `ischeckpwd` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启密码验证',
  `password` varchar(255) NOT NULL DEFAULT '' COMMENT '海报校验密码',
  `pwdfail` varchar(255) NOT NULL DEFAULT '' COMMENT '错误提示',
  `pwdinfo` varchar(255) NOT NULL DEFAULT '' COMMENT '输入密码提示：例如请输入密码',
  `is_parent_info` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启获取一级用户信息',
  `parent_info` varchar(255) NOT NULL DEFAULT '' COMMENT '获取一级用户信息通知',
  `send_poster` text COMMENT '返回推荐者海报信息数据',
  `groupid` varchar(150) NOT NULL DEFAULT '' COMMENT '粉丝自动打标签',
  `is_groupid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启自动分组',
  `reckeyword_prefix` varchar(10) NOT NULL DEFAULT '' COMMENT '邀请码前缀',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_gzh_qr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL DEFAULT '0',
  `uid` int(10) NOT NULL DEFAULT '0',
  `type` tinyint(3) NOT NULL DEFAULT '0',
  `sceneid` int(11) NOT NULL DEFAULT '0',
  `mediaid` varchar(255) NOT NULL DEFAULT '',
  `ticket` varchar(250) NOT NULL DEFAULT '',
  `url` varchar(80) NOT NULL DEFAULT '',
  `createtime` int(10) NOT NULL DEFAULT '0',
  `qrimg` varchar(1000) NOT NULL DEFAULT '',
  `scenestr` varchar(255) NOT NULL DEFAULT '',
  `posterid` int(10) NOT NULL DEFAULT '0' COMMENT '海报id',
  `openid` varchar(100) NOT NULL DEFAULT '',
  `file` varchar(255) NOT NULL DEFAULT '',
  `nums` int(10) NOT NULL DEFAULT '0' COMMENT '扫码总次数',
  `finish_random_nums` int(10) NOT NULL DEFAULT '0' COMMENT '当前海报统计邀请任务完成次数',
  `randomnum` int(10) NOT NULL DEFAULT '0' COMMENT '随机记录数',
  `updateday` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间当前',
  `updatetime` varchar(20) NOT NULL DEFAULT '' COMMENT '更新时间 时分',
  `updatenum` int(10) NOT NULL DEFAULT '0' COMMENT '每天更新一次累加',
  `clock_num` int(10) NOT NULL DEFAULT '0' COMMENT '打卡统计累加',
  `reccode` varchar(10) NOT NULL DEFAULT '' COMMENT '推荐码',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

";
pdo_run($sql);
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `uid` varchar(255) DEFAULT '' COMMENT '我的uid';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "posterid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `posterid` int(11) DEFAULT '0' COMMENT '海报id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "from_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `from_uid` varchar(255) DEFAULT '' COMMENT '邀请人uid';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "subcredit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `subcredit` int(11) DEFAULT '0' COMMENT '关注者积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "reccredit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `reccredit` int(11) DEFAULT '0' COMMENT '推荐人积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "recmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `recmoney` decimal(10,2) DEFAULT '0.00' COMMENT '推荐人余额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "submoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `submoney` decimal(10,2) DEFAULT '0.00' COMMENT '关注者余额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "isunsub")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `isunsub` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否取消关注';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `uid` int(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `createtime` int(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "scancodenum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `scancodenum` int(10) NOT NULL DEFAULT '0' COMMENT '总扫码次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "randomnum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `randomnum` int(10) NOT NULL DEFAULT '0' COMMENT '总随机触发数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '等级 0本身 1级  2级 3级';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level1_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level1_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级1会员id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level2_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level2_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级2会员id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level3_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level3_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级3会员id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `nickname` varbinary(100) NOT NULL DEFAULT '' COMMENT '会员昵称';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "parentid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `parentid` int(11) NOT NULL DEFAULT '0' COMMENT '父级id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level_num` int(11) NOT NULL DEFAULT '0' COMMENT '无限极 0 初级  大于0 级数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "misterid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `misterid` int(11) NOT NULL DEFAULT '0' COMMENT '源头';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "isceshi")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `isceshi` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否测试数据';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "ranking")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `ranking` int(11) NOT NULL DEFAULT '0' COMMENT '排名';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `type` tinyint(3) DEFAULT '0' COMMENT '0关注海报';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `title` varchar(255) DEFAULT '' COMMENT '标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "bg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `bg` varchar(255) DEFAULT '' COMMENT '背景';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "data")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `data` text COMMENT '位置数据';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "keyword")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `keyword` varchar(255) DEFAULT '' COMMENT '触发关键词';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "times")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `times` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "follows")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `follows` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isdefault")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isdefault` tinyint(3) DEFAULT '0' COMMENT '是否默认 1是 0否';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "resptitle")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `resptitle` varchar(255) DEFAULT '' COMMENT '推送标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "respthumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `respthumb` varchar(255) DEFAULT '' COMMENT '推送图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `createtime` int(11) DEFAULT '0' COMMENT '推送时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "respdesc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `respdesc` varchar(255) DEFAULT '' COMMENT '推送内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "respurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `respurl` varchar(255) DEFAULT '' COMMENT '推送url';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "waittext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `waittext` varchar(255) DEFAULT '' COMMENT '等待提示';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "oktext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `oktext` varchar(255) DEFAULT '' COMMENT '制作成功提示';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subcredit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subcredit` int(11) DEFAULT '0' COMMENT '关注者获得积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "submoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `submoney` decimal(10,2) DEFAULT '0.00' COMMENT '关注者获得金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reccredit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reccredit` int(11) DEFAULT '0' COMMENT '推荐人获得积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "recmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `recmoney` decimal(10,2) DEFAULT '0.00' COMMENT '推荐人获得金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "paytype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `paytype` tinyint(1) DEFAULT '0' COMMENT '奖励现金方式 0余额 1微信钱包';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "scantext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `scantext` varchar(255) DEFAULT '' COMMENT '推荐者通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subtext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subtext` varchar(255) DEFAULT '' COMMENT '关注者通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "beagent")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `beagent` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "bedown")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `bedown` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isopen")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isopen` tinyint(3) DEFAULT '0' COMMENT '是否开启';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "opentext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `opentext` varchar(255) DEFAULT '' COMMENT '未开放时候的提示';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "openurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `openurl` varchar(255) DEFAULT '' COMMENT '未开放时候的说明连接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "templateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `templateid` varchar(255) DEFAULT '' COMMENT '通知模板消息ID（任务处理通知）';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subpaycontent")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subpaycontent` text COMMENT '您通过 [nickname]的推广二维码扫码关注的奖励';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "recpaycontent")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `recpaycontent` text COMMENT '推荐 [nickname] 扫码关注的奖励';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "entrytext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `entrytext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reccouponid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reccouponid` int(11) DEFAULT '0' COMMENT '推送者送优惠券ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reccouponnum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reccouponnum` int(11) DEFAULT '0' COMMENT '推送者送优惠券数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subcouponid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subcouponid` int(11) DEFAULT '0' COMMENT '关注者送优惠券ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subcouponnum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subcouponnum` int(11) DEFAULT '0' COMMENT '关注者送优惠券数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "random")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `random` int(10) NOT NULL DEFAULT '0' COMMENT '随机次数  n次之后重0开始 触发一次';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sendtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sendtype` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'n次后触发发送类型 0链接 1二维码 2图文';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sendval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sendval` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者链接文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sendurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sendurl` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "followval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `followval` varchar(255) NOT NULL DEFAULT '' COMMENT '关注着链接文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "followurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `followurl` varchar(255) NOT NULL DEFAULT '' COMMENT '关注者链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sendcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sendcode` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "followcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `followcode` varchar(255) NOT NULL DEFAULT '' COMMENT '关注者二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "rec_credit_random")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `rec_credit_random` int(10) NOT NULL DEFAULT '0' COMMENT '随机数到达后赠送推送者积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "rec_money_random")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `rec_money_random` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '随机数到达后赠送推送者金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "relaystart")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `relaystart` int(11) NOT NULL DEFAULT '0' COMMENT '接力起始值';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "pcate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `pcate` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "ccate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `ccate` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level1_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level1_credit` int(10) NOT NULL DEFAULT '0' COMMENT '一级获取积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level2_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level2_credit` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level3_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level3_credit` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level1_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level1_money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level2_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level2_money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level3_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level3_money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level0_val")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level0_val` varchar(255) NOT NULL DEFAULT '' COMMENT '分销统一提醒文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level0_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level0_url` varbinary(255) NOT NULL DEFAULT '' COMMENT '分销统一提醒文字链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 一级 2二级 3三级';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "coverimg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `coverimg` varchar(255) NOT NULL DEFAULT '' COMMENT '封面图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isopen_level")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isopen_level` tinyint(3) DEFAULT '0' COMMENT '是否开启三级营销';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "limitrandom")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `limitrandom` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isclock")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isclock` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启打卡 0否 1是';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_start_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_start_time` varchar(10) NOT NULL DEFAULT '' COMMENT '打开开始时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_end_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_end_time` varchar(10) NOT NULL DEFAULT '' COMMENT '打开结束时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_msg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_msg` varbinary(1000) NOT NULL DEFAULT '' COMMENT '打卡成功提醒';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_err")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_err` varbinary(1000) NOT NULL DEFAULT '' COMMENT '错过打卡时间提醒';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_send_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_send_credit` int(10) NOT NULL DEFAULT '0' COMMENT '打卡赠送积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_send_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_send_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '打卡赠送余额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reckeyword")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reckeyword` varchar(20) NOT NULL DEFAULT '' COMMENT '完成邀请关键词';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "minetext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `minetext` varchar(255) NOT NULL DEFAULT '' COMMENT '自扫了通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "next_active_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `next_active_text` varchar(255) NOT NULL DEFAULT '' COMMENT '下一轮提示语';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "scan_random_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `scan_random_text` varchar(255) NOT NULL DEFAULT '' COMMENT '随机任务完成通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subresptype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subresptype` tinyint(1) NOT NULL DEFAULT '0' COMMENT '关注者回复类型0图文2关键字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subresp_keyword")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subresp_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '关注着回复触发关键字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isopenauto")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isopenauto` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启自动生成海报';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subaudio_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subaudio_url` varchar(255) NOT NULL DEFAULT '' COMMENT '推送关注者音频链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sub_sendval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sub_sendval` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sub_sendurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sub_sendurl` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isunsubscribe")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isunsubscribe` tinyint(1) NOT NULL DEFAULT '0' COMMENT '取消关注事件是否开启';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "unsub_sendval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `unsub_sendval` varchar(255) NOT NULL DEFAULT '' COMMENT '取消关注推送给上级内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "israndomimg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `israndomimg` tinyint(1) NOT NULL DEFAULT '0' COMMENT '图片是否随机抽取0否1是';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "randomimgs")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `randomimgs` text COMMENT '随机图片抽取地址序列化';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "ischeckpwd")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `ischeckpwd` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启密码验证';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "password")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `password` varchar(255) NOT NULL DEFAULT '' COMMENT '海报校验密码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "pwdfail")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `pwdfail` varchar(255) NOT NULL DEFAULT '' COMMENT '错误提示';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "pwdinfo")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `pwdinfo` varchar(255) NOT NULL DEFAULT '' COMMENT '输入密码提示：例如请输入密码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "is_parent_info")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `is_parent_info` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启获取一级用户信息';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "parent_info")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `parent_info` varchar(255) NOT NULL DEFAULT '' COMMENT '获取一级用户信息通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "send_poster")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `send_poster` text COMMENT '返回推荐者海报信息数据';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "groupid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `groupid` varchar(150) NOT NULL DEFAULT '' COMMENT '粉丝自动打标签';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "is_groupid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `is_groupid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启自动分组';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reckeyword_prefix")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reckeyword_prefix` varchar(10) NOT NULL DEFAULT '' COMMENT '邀请码前缀';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `uniacid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `uid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "sceneid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `sceneid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "mediaid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `mediaid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "ticket")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `ticket` varchar(250) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `url` varchar(80) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `createtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "qrimg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `qrimg` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "scenestr")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `scenestr` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "posterid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `posterid` int(10) NOT NULL DEFAULT '0' COMMENT '海报id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "file")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `file` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "nums")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `nums` int(10) NOT NULL DEFAULT '0' COMMENT '扫码总次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "finish_random_nums")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `finish_random_nums` int(10) NOT NULL DEFAULT '0' COMMENT '当前海报统计邀请任务完成次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "randomnum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `randomnum` int(10) NOT NULL DEFAULT '0' COMMENT '随机记录数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "updateday")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `updateday` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间当前';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "updatetime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `updatetime` varchar(20) NOT NULL DEFAULT '' COMMENT '更新时间 时分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "updatenum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `updatenum` int(10) NOT NULL DEFAULT '0' COMMENT '每天更新一次累加';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "clock_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `clock_num` int(10) NOT NULL DEFAULT '0' COMMENT '打卡统计累加';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "reccode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `reccode` varchar(10) NOT NULL DEFAULT '' COMMENT '推荐码';");
}
